<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>对象的扩展-assign</title>
    <script>
      let user1 = {
          id:10010,
          name:"zxy"
      }
      let user2 = {
          id:10012,
          age:50
      }
      let user3 = {
          age:60,
          address:"浦东航头"
      }

      user3.heima63="666";

      //把source中的属性以及值依次赋值给target
      //属性存在，覆盖值，属性不存在，就添加
      Object.assign(user1,user2,user3);

      console.log(user1);
      console.log(user2);
      console.log(user3);

    </script>
</head>
<body>

</body>
</html>